package com.atguigu.lease.common.context;

public class LoginUserContext {
    private static ThreadLocal<LoginUser> threadLocal = new ThreadLocal<>();

    public static void setContext(LoginUser loginUser) {
        threadLocal.set(loginUser);
    }
    public static LoginUser getContext() {
        return threadLocal.get();
    }


    public static void clearContext() {
        threadLocal.remove();
    }
}
